function xOut = ctranspose(xIn)
  n = size(xIn.v);
  I = reshape(1:prod(n),n);
  I = I';
  xOut.v = xIn.v';
  xOut.d = xIn.d(I,:);
  xOut=class(xOut,'deriv1s');
